// main.ts
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'virtual:svg-icons-register'
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 引入全局组件
import gloabComponent from './components'
// 引入全局样式
import './style/index.scss';
// 引入黑暗模式
import "element-plus/theme-chalk/dark/css-vars.css";
// 引入pinia
import pinia  from './store'
import router from './routes'
import "@/premisstion"
import App from './App.vue'


const app = createApp(App);

// 引入自定义指令
import { isHas } from "@/directive/has"
isHas(app);

// 设置国际化
app.use(ElementPlus,{
  locale: zhCn,
})
app.use(gloabComponent);
app.use(router);
app.use(pinia);


app.mount('#app')